<template>
  <div class="tobBtoC">
    <div class="contentTopTitle">
      <div class="fl">
        <div class="title">详情</div>
      </div>
      <div class="fr">
        <el-button
          @click="$router.back()"
          size="mini"
          >返回</el-button
        >
      </div>
    </div>
    <div class="table-content clearfix">
      <div class="content">
        <div class="tableBox">
          <el-table
            id="table1"
            ref="table"
            size="mini"
            :header-cell-style="{ background: '#eef1f6' }"
            :data="tableData"
            v-loading="tableLoading"
            style="width: 100%"
            border
          >
            <el-table-column prop="vercalIndexId" label="指标id(必填)" />
            <el-table-column prop="vercalIndexName" label="指标名称" />
            <el-table-column prop="areaId" label="区域id(必填)" />
            <el-table-column prop="areaName" label="区域名称" />
            <el-table-column prop="indexValue" label="指标值(保留两位小数)" />
          </el-table>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { $budgetAPI } from "@/api";
export default {
  data() {
    return {
      tableData: [],
      tableLoading: false,
      titles: [],
    };
  },
  created() {
    this.getData();
  },
  methods: {
    getData() {
      this.tableLoading = true;
      $budgetAPI.getBudgetListData(
        {
          logId: this.$route.query.logId,
        },
        (res) => {
          this.alertError(res);
          if (res && res.code == 0) {
            // console.log(res);
            this.tableData = res.content;
          }
          this.tableLoading = false;
        },
        err => {
          this.alertError(err);
          this.tableLoading = false;
        }
      );
    },
  },
};
</script>

<style lang="scss" scoped>
.remark {
  padding-top: 5px;
  text-align: left;
  .attention {
    font-weight: bold;
  }
}
.table-content {
  .table-header {
    display: flex;
    justify-content: space-between;
    .table-title {
      font-size: 14px;
      font-weight: bold;
      height: 30px;
      line-height: 30px;
      span {
        display: inline-block;
        width: 5px;
        height: 5px;
        background-color: #418ee9;
        border-radius: 1000%;
        overflow: hidden;
        margin-right: 10px;
        margin-bottom: 3px;
      }
    }
  }
  .content {
    margin-top: 15px;
  }
}
</style>
